import request from "@/utils/request";

// 查询知识库列表
export function listExercise(query) {
  return request({
    url: "/system/exercise/list",
    method: "get",
    params: query,
  });
}

// 查询知识库详细
export function getExercise(exerciseId) {
  return request({
    url: "/system/exercise/" + exerciseId,
    method: "get",
  });
}

// 新增知识库
export function addExercise(data) {
  return request({
    url: "/system/exercise",
    method: "post",
    data: data,
  });
}

// 修改知识库
export function updateExercise(data) {
  return request({
    url: "/system/exercise",
    method: "put",
    data: data,
  });
}

// 删除知识库
export function delExercise(exerciseId) {
  return request({
    url: "/system/exercise/" + exerciseId,
    method: "delete",
  });
}
